<%@page language="Java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="includes/head.jsp" %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Edit Profile</title>
</head>
<body>
	<f:view>
		<span id="whole-page-wrapper">
			<div id="wrapper" align="center">
			<%@include file="includes/header.jsp" %>
			<%@include file="includes/menu.jsp" %>	
					
				<div id="content">
					<div id="inner-content">
					<h3><a href="editUser.jsp">Edytuj swoje dane</a></h3>
					<c:if test="${sessionScope.user.loggedUser != null}">
					<h3><a href="changePass.jsp?userid=${sessionScope.user.id}">Zmień hasło</a></h3><br>
					<c:if test="${sessionScope.user.loggedUser.type == 'User'}">
						<h3><a href="transactions.jsp">Zamówienia</a></h3><br>
					</c:if>
					<h3> Wygląd strony (motyw) </h3>
						<h:form>
							<fieldset>
								<h:selectOneMenu value="#{user.style }">
									<f:selectItem itemLabel="Pure" itemValue="1" />
									<f:selectItem itemLabel="Oldschool" itemValue="2" />
									<f:selectItem itemLabel="War" itemValue="3" />
								</h:selectOneMenu>
								<h:commandButton action="#{user.changeTheme }"  value="Zmień motyw" />
							</fieldset>
						</h:form>	
					</c:if>
					<c:if test="${sessionScope.user.loggedUser == null }">
							Nie masz uprawnień do korzystania z tej strony!
						</c:if>	
					</div>
				</div>
				<%@include file="includes/footer.jsp" %>
			</div>
		</span>
	</f:view>
</body>
</html>